/**
 ***************************************************** 
 * <hr>
 * <dt><span class="strong">类功能简介:</span></dt>
 * <dd>Coffee</dd>
 * <dt><span class="strong">创建时间:</span></dt>
 * <dd>2015-3-6 上午10:43:28</dd>
 * <dt><span class="strong">公司:</span></dt>
 * <dd>单例模式</dd>
 * 
 * @author aa1000777 - Email:aa1000777@qq.com
 ***************************************************** 
 */
public class Singleton {
	private static Object obj = new Object();
	private static Singleton instance = null;

	private Singleton() {
	}

	public static Singleton getInstance() {
		// if already inited, no need to get lock everytime
		if (instance == null) {
			synchronized (obj) {
				if (instance == null) {
					instance = new Singleton();
				}
			}
		}
		return instance;
	}
}